import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admin/auth/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: `/admin/auth/info?token=${token}`,
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/admin/auth/logout',
    method: 'post'
  })
}

//会员管理
export function getmyuser(params) {
  return request({
    url: '/admin/user/list',
    method: 'get',
    params
  })
}

//会员地址管理
export function getmyaddress(params) {
  return request({
    url: '/admin/address/list',
    method: 'get',
    params
  })
}

// 会员收藏  /collect/list

export function getmycollect(params) {
  return request({
    url: '/admin/collect/list',
    method: 'get',
    params
  })
}
// 会员足迹  /footprint/list

export function getmyfootprint(params) {
  return request({
    url: '/admin/footprint/list',
    method: 'get',
    params
  })
}

// 搜索历史 /history/list

export function getmyhistory(params) {
  return request({
    url: '/admin/history/list',
    method: 'get',
    params
  })
}

// 意见反馈 /feedback/list

export function getmyfeedback(params) {
  return request({
    url: '/admin/feedback/list',
    method: 'get',
    params
  })
}